-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use try_from
instead of the cast crate.
#172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! It looks like there are 2 more crates which could use converting from cast
to try_from
: wasmtime-wasi-c
and wasmtime-runtime
. Do you think you'd be able to make those changes in this PR? :-)
`try_from` is stable now, so cast is unnecessary.
@kubkon I've converted those two crates too! #[cfg(target_pointer_width = "32")]
let sig_id = VMSharedSignatureIndex::new(cast::u32(len));
#[cfg(target_pointer_width = "64")]
let sig_id = VMSharedSignatureIndex::new(cast::u32(len).unwrap()); I assume that this is written as such because the |
Correct!
None at all. To the best of my knowledge, we can safely chuck away the |
Alright, then this should be ready to merge 😁 I made sure to |
Looks great, thanks! For the future, you can run |
* delete adapter src/main.o: this was accidentally left out of bytecodealliance#165 * move adapter, byte-array, and verify to a new workspace * rename byte-array crate to a name available on crates.io * add a readme for verify, also give it a slightly better name * CI: wit dep check in its own step, verify before publish, trim down publication * reactor-tests: delete deps symlinks * reactor-tests: manage wit with wit-deps * test: dont set default toolchain to nightly * wit-deps lock adapter * wit-deps lock reactor-tests wit-deps doesnt manage these for some reason
* delete adapter src/main.o: this was accidentally left out of bytecodealliance#165 * move adapter, byte-array, and verify to a new workspace * rename byte-array crate to a name available on crates.io * add a readme for verify, also give it a slightly better name * CI: wit dep check in its own step, verify before publish, trim down publication * reactor-tests: delete deps symlinks * reactor-tests: manage wit with wit-deps * test: dont set default toolchain to nightly * wit-deps lock adapter * wit-deps lock reactor-tests wit-deps doesnt manage these for some reason
try_from
is stable now, so cast is unnecessary.This closes #169